# -=- encoding: UTF-8

def get_choice(value, choices):
    # choices im Django-Choices-Format:
    """
        GENDER_CHOICES = (
            ('0', u'männlich'),
            ('1', u'weiblich'),
        )
    """
    return [a[1] for a in choices if a[0] == unicode(value)][0]
    
def make_menu(menu):
    pass
    
from django.views.generic.simple import direct_to_template as django_direct_to_template    
def direct_to_template(request, menu='core', template='base/index.html', context={}):
    menu_context = {'menu': make_menu(menu) }
    context.update(menu_context)
    return django_direct_to_template(        
        request,
        template = template,        
        extra_context = context
    )


 